package site.brood.log.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import site.brood.common.core.entity.BaseEntity;
import site.brood.common.core.excel.annotation.Excel;

import java.util.Date;

@ApiModel("登陆日志实体类")  //Swagger注解
@TableName("log_login")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LogLogin extends BaseEntity {
    /** ID */
    @TableId(type = IdType.AUTO)
    @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
    private Long id;

    /** 用户账号 */
    @Excel(name = "用户账号")
    private String username;

    /** 状态 成功 失败 */
    @Excel(name = "状态")
    private String status;

    /** 地址 */
    @Excel(name = "地址")
    private String ipaddr;

    /** 描述 */
    @Excel(name = "描述")
    private String msg;

    /** 访问时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date accessTime;
}
